@include('admin.public.head')
@include('admin.public.pop')

<style type="text/css">

    .inner_btn {
        background: #19a97b;
        color: white;
        padding: 5px 8px;
        border-radius: 2px;
    }

</style>

<div class="ibox-title">
    <h5>兑换记录</h5>
</div>

<div class="ibox-content">

    <div class="row">
        <div class="col-sm-12 clear">
            <div class="" style="margin: 15px 10px">
                <a href="/coupon" class="btn btn-w-m btn-primary">優惠卷管理</a>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12 pull-right m-b-xs">
            <form action="">
                <div class="col-sm-1  m-b-xs text-center pull-right">
                    <button type="submit" class="btn btn-sm btn-primary">搜索</button> </span>
                </div>

                <div class="col-sm-2 text-center pull-right">
                    <input type="text" name="sear_value" value="{{$sear_value}}" placeholder="姓名/手機號/昵稱/用戶id" class="input form-control">
                </div>

            </form>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>姓名</th>
            <th>用戶編號</th>
            <th>用戶頭像</th>
            <th>用戶等级</th>
            <th>用戶昵稱</th>
            <th>手機號</th>
            <th>訓練時長(分鐘)</th>
            <th>積分</th>
        </tr>
        </thead>
        <tbody>
        @foreach ($result as $k=>$v)
            <tr>
                <td>
                    {{$v->name}}
                </td>
                <td>
                    {{$v->user_number}}
                </td>
                <td>
                    <img src="{{$v->head_img}}" width="300" height="150">
                </td>
                <td>
                    {{$v->user_level->rank_name??''}}
                </td>
                <td>
                    {{$v->nickname??''}}
                </td>
                <td>{{$v->phone}}</td>
                <td>{{$v->total_train_time??''}}</td>
                <td>{{$v->total_integral??''}}</td>
            </tr>
        @endforeach
        </tbody>
        {{ $result->appends(Request::except ('page'))->links() }}
    </table>
    {{ $result->appends(Request::except ('page'))->links() }}
</div>
